Hệ thống quản lý phương tiện trong PHP
1 <?php
2 $connection= mysqli_connect("localhost","root","","vehiclemanagement");
3
4 session_start();
5
6 $sql= "SELECT * FROM `driver`";
7 $res=mysqli_query($connection,$sql);
8 ?>
9 <!DOCTYPE html>
10 <html lang="en">
11 <head>
12 <meta charset="UTF-8">
13 <title>List of Drivers</title>
14
15 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
16 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
17 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
18 <script src="https://unpkg.com/scrollreveal/dist/scrollreveal.min.js"></script>
19 <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
20 <script src="https://code.jquery.com/jquery-2.2.0.min.js" type="text/javascript"></script>
21 <link rel="stylesheet" href="animate.css">
22 <link rel="stylesheet" href="style.css">
23 </head>
24
25 <body >
26
27 <div id="myDiv">
28
29 <?php include 'navbar.php'; ?>
30 <br><br><br>
31 <div class="container">
32 <?php
33 if(mysqli_num_rows($res)>0){ ?>
34
35 <div class="container">
36 <div class="row">
37 <div class="col-md-3"></div>
38 <div class="col-md-6">
39 <div class="page-header">
40 <h1 class="animated tada" style="text-align: center;">Drive List</h1>
41 </div>
42 <table class="table foo">
43 <thead>
44 <th>Profile Picture</th>
45 <th>Driver Name</th>
46 </thead>
47
48 <?php while($row=mysqli_fetch_assoc($res)) { ?>
49 <tbody>
50 <tr>
51 <td><img height="100px" width="100px" src="picture/<?php echo $row["drphoto"]; ?>" alt="dp"></td>
52
53 <td><a href="driverprofile.php?driverid=<?php echo $row["driverid"]; ?>"> <?php echo $row["drname"] ?></a></td>
54 </tr>
55 </tbody>
56 <?php } }?>
57 </table>
58 </div>
59 <div class="col-md-3"></div>
60 </div>
61
62 </div>
63
64 </div>
65 </div>
66
67 <script src="https://unpkg.com/scrollreveal/dist/scrollreveal.min.js"></script>
68
69 <script>
70 window.sr = ScrollReveal();
71 sr.reveal('.foo', { duration: 800 });
72
73 </script>
74
75
76
77 </body>
78 </html>